#ifndef __VLOG_LOGGEMANGER_H__
#define __VLOG_LOGGEMANGER_H__

#include <map>
#include <string>
#include <string_view>
#include <vector>

#include "logger.h"
#include "singleton.h"

namespace vlog
{

class LoggerManger
{
    public:
    LoggerManger();

    Logger::ptr GetLogger(const std::string_view name) noexcept;

    Logger::ptr GetRoot() const noexcept
    {
        return m_root;
    };

    private:
    std::map<std::string, Logger::ptr> m_loggers;
    Logger::ptr m_root;
};

using LoggerMgr = Singleton<LoggerManger>;

} // namespace vlog
#endif